package work.konbai.finance.feign;

import org.springblade.core.launch.constant.AppConstant;
import org.springblade.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import work.konbai.finance.entity.Account;
import work.konbai.finance.feign.fallback.AccountClientFallback;

import java.util.List;

/**
 * @author KonBAI
 * @version 1.0
 * Create by 2021/4/2 10:33
 */
@FeignClient(
	value = AppConstant.APPLICATION_FINANCE_NAME,
	fallback = AccountClientFallback.class
)
public interface IAccountClient {

	String API_PREFIX = "/finance";

	@GetMapping(API_PREFIX + "/all-account")
	R<List<Account>> allAccounts();
}
